home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Forever 4
/
Atari Forever 4.zip
/
Atari Forever 4.iso
/
SERIE_DM
/
DM_155
/
DM_155.MSA
/
EQUINOX
/
REPLAY.S
< prev
Wrap
Text File
|
1986-04-24
|
12KB
|
543 lines
;----------------------------------------------------
;------- Soundtracker V2.4 - playroutine -------
;------- Coded by CHECKSUM from EQUINOX! -------
;----------------------------------------------------
; call mt_init to initialize the playroutine.
; call mt_music in each vbl to play the music.
; WARNING !! You have only 4 registers to work
; in your program. they are d0,d1,a0,a1. Have fun !
lea deb,a0
lea fin,a1
deb
bra mt_init
bra mt_music
bra mt_end
level1 ds.w 1
level2 ds.w 1
level3 ds.w 1
level4 ds.w 1
mt_gfa
move.l 4(sp),a0
lea mt_adrsave(pc),a1
move.l a0,(a1)
clr.l -(sp)
move.w #$20,-(sp)
trap #1
addq.l #6,sp
lea mt_adrsave(pc),a1
move.l (a1),a0
move.l d0,(a1)
clr.b $fffa09
bsr mt_init
move.l $70.w,-(sp)
lea newvbl(pc),a0
move.l a0,$70.w
att cmp.b #$39,$fffc02
bne att
move.w #$2700,sr
move.l (sp)+,$70.w
bsr mt_end
move.b #$64,$fffa09
move.w #$2300,sr
move.w #4000,d0
wait68901
nop
dbra d0,wait68901
move.l mt_adrsave(pc),-(sp)
move.w #$20,-(sp)
trap #1
addq.l #6,sp
rts
newvbl
bsr mt_music
rte
mt_init
lea mt_data(pc),a1
move.l a0,(a1)
move.l #472,d0
move.l #600,d1
cmp.l #$4d2e4b2e,1080(a0)
bne.s mt_oldversion
move.l #$3b8,d0
move.l #$43c,d1
mt_oldversion
lea mt_nbr1(pc),a1
move.l d0,2(a1)
lea mt_nbr2(pc),a1
move.l d1,2(a1)
lea mt_nbr3(pc),a1
move.l d0,2(a1)
lea mt_nbr4(pc),a1
move.l d1,2(a1)
add.l d0,a0
moveq #$7f,d0
moveq #0,d1
mt_init1
move.l d1,d2
subq.w #1,d0
mt_init2
move.b (a0)+,d1
cmp.b d2,d1
bgt.s mt_init1
dbra d0,mt_init2
addq.b #1,d2
mt_init3
move.l mt_data(pc),a0
lea mt_sample1(pc),a1
asl.l #8,d2
asl.l #2,d2
mt_nbr4 add.l #0,d2
add.l a0,d2
moveq #30,d0
mt_init4
move.l d2,(a1)+
moveq #0,d1
move.w 42(a0),d1
asl.l #1,d1
add.l d1,d2
add.l #30,a0
dbra d0,mt_init4
move.l d2,a1
move.l mt_sample1(pc),a0
mt_init5
eor.b #128,(a0)
tst.b (a0)
bne.s mt_init6
addq.b #1,(a0)
mt_init6
addq.l #1,a0
cmp.l a0,a1
bgt.s mt_init5
lea mt_sample1(pc),a0
moveq #4,d0
mt_clear
move.l (a0,d0.w),a1
clr.l -4(a1)
addq.w #4,d0
cmp.w #$7c,d0
bne.s mt_clear
move.w #$2700,sr
lea $ffff8800.w,a0
moveq #10,d0
mt_yamahaclear
move.b d0,(a0)
clr.b 2(a0)
dbra d0,mt_yamahaclear
clr.b (a0)
clr.b 2(a0)
move.b #7,(a0)
move.b #$ff,2(a0)
move.b #$02,$fffa19
move.b #14,$fffa1f
bclr #3,$fffa17
bset #5,$fffa07
bset #5,$fffa13
lea denise(pc),a0
move.l a0,$134.w
lea mt_partnrplay(pc),a0
clr.l (a0)+
clr.l (a0)+
clr.l (a0)+
clr.w (a0)
lea mt_cool(pc),a0
move.w #6,2(a0)
move.l mt_data(pc),a0
mt_nbr3 add.l #$3b8,a0
lea mt_maxpart(pc),a1
move.b -2(a0),1(a1)
lea mt_cool(pc),a0
move.b #6,3(a0)
move.b $fb0001,d7
lea no_noise(pc),a2
lea voice1(pc),a3
lea voice2(pc),a4
lea voice3(pc),a5
lea voice4(pc),a6
move.l a2,16(a3)
move.l a2,16(a4)
move.l a2,16(a5)
move.l a2,16(a6)
move.l a2,a3
move.l a3,a4
move.l a4,a5
moveq #0,d2
moveq #0,d3
moveq #0,d4
moveq #0,d5
lea $fa0000,a6
lea mt_selection(pc),a0
moveq #0,d6
move.b d7,d6
and.b #$f0,d6
cmp.b #$70,d6
bne.s mt_testbat
move.w #$601a,(a0)
move.w #$2300,sr
rts
mt_testbat
cmp.b #$ff,d7
beq.s mt_monitor_outpout
move.w #$6024,(a0)
move.w #$2300,sr
rts
mt_monitor_outpout
move.w #$0246,(a0)
move.w #$2300,sr
rts
mt_end
bset #3,$fffa17
and.b #$df,$fffa07
and.b #$df,$fffa13
rts
; now the playroutine ! call it every vbl.
mt_music
movem.l d0/d1/a0/a1,-(sp)
lea mt_counter(pc),a0
addq.w #1,(a0)
mt_cool
cmp.w #6,(a0)
bne.s mt_notsix
clr.w (a0)
bra mt_rout2
mt_notsix
lea mt_aud1temp(pc),a1
tst.b 3(a1)
beq.s mt_arp1
lea voice1(pc),a0
bsr.s mt_arprout
mt_arp1
lea mt_aud2temp(pc),a1
tst.b 3(a1)
beq.s mt_arp2
lea voice2(pc),a0
bsr.s mt_arprout
mt_arp2
lea mt_aud3temp(pc),a1
tst.b 3(a1)
beq.s mt_arp3
lea voice3(pc),a0
bsr.s mt_arprout
mt_arp3
lea mt_aud4temp(pc),a1
tst.b 3(a1)
beq.s mt_arp4
lea voice4(pc),a0
bsr.s mt_arprout
mt_arp4
movem.l (sp)+,d0/d1/a0/a1
rts
mt_arprout
move.b 2(a1),d0
and.b #$f,d0
tst.b d0
beq mt_arpegrt
cmp.b #1,d0
beq mt_portup
cmp.B #2,d0
beq mt_portdown
rts
mt_portup
moveq #0,d0
move.b 3(a1),d0
sub.w d0,22(a1)
cmp.w #$71,22(a1)
bpl.s mt_ok1
move.w #$71,22(a1)
mt_ok1 move.w 22(a1),d0
lea mt_frequences(pc),a1
asl.l #2,d0
move.l (a1,d0.w),2(a0)
rts
mt_portdown
moveq #0,d0
move.b 3(a1),d0
add.w d0,22(a1)
cmp.w #$358,22(a1)
bmi.s mt_ok2
move.w #$358,22(a1)
mt_ok2 bra mt_ok1
mt_arpegrt
move.w mt_counter(pc),d0
cmp.w #1,d0
beq.s mt_loop2
cmp.w #2,d0
beq.s mt_loop3
cmp.w #3,d0
beq.s mt_loop4
cmp.w #4,d0
beq.s mt_loop2
cmp.w #5,d0
beq.s mt_loop3
rts
mt_loop2
moveq #0,d0
move.b 3(a1),d0
lsr.b #4,d0
bra.s mt_cont
mt_loop3
moveq #0,d0
move.b 3(a1),d0
and.b #$f,d0
bra.s mt_cont
mt_loop4
moveq #0,d1
move.w 16(a1),d1
bra.s mt_endpart
mt_cont
add.w d0,d0
moveq #0,d1
move.w 16(a1),d1
and.w #$fff,d1
lea mt_arpeggio(pc),a1
mt_loop5
cmp.w (a1),d1
beq.s loop5_exit
addq.l #2,a1
bra.s mt_loop5
loop5_exit
move.w (a1,d0.w),d1
mt_endpart
lea mt_frequences(pc),a1
asl.l #2,d1
move.l (a1,d1.w),2(a0)
rts
mt_rout2
move.l mt_data(pc),a0
lea mt_soundpref(pc),a1
move.l a0,(a1)
add.l #42,(a1)
move.l a0,a1
mt_nbr1 add.l #0,a1
mt_nbr2 add.l #0,a0
move.l a1,-(sp)
lea mt_firstpattern(pc),a1
move.l a0,(a1)
move.l (sp)+,a1
moveq #0,d1
move.l mt_partnrplay(pc),d0
move.b (a1,d0.w),d1
asl.l #8,d1
asl.l #2,d1
add.l mt_partnote(pc),d1
lea mt_aud1temp(pc),a1
bsr mt_playit
lea mt_aud2temp(pc),a1
move.l mt_currentpos(pc),d1
bsr mt_playit
lea mt_aud3temp(pc),a1
move.l mt_currentpos(pc),d1
bsr mt_playit
lea mt_aud4temp(pc),a1
move.l mt_currentpos(pc),d1
bsr mt_playit
move.w #$2700,sr
mt_voice1
lea voice1(pc),a0
lea mt_aud1temp(pc),a1
tst.w (a1)
beq.s mt_voice2
; here is for equa inf
move.l a0,-(sp)
lea level1(pc),a0
move.w 18(a1),(a0)
move.l (sp)+,a0
moveq #0,d0
move.w (a1),d0
and.w #$fff,d0
move.w d0,16(a1)
move.W d0,22(a1)
move.l 4(a1),a2
moveq #0,d2
moveq #0,d0
move.w (a1),d0
and.w #$fff,d0
asl.l #2,d0
move.l a1,-(sp)
lea mt_frequences(pc),a1
move.l (a1,d0.w),2(a0)
move.l (sp)+,a1
tst.w 14(a1)
beq.s mt_norepeat1
move.l 10(a1),16(a0)
bra.s mt_voice2
mt_norepeat1
lea no_noise(pc),a1
move.l a1,16(a0)
mt_voice2
lea voice2(pc),a0
lea mt_aud2temp(pc),a1
tst.w (a1)
beq.s mt_voice3
; here is for equa inf
move.l a0,-(sp)
lea level2(pc),a0
move.w 18(a1),(a0)
move.l (sp)+,a0
moveq #0,d0
move.w (a1),d0
and.w #$fff,d0
move.w d0,16(a1)
move.W d0,22(a1)
move.l 4(a1),a3
moveq #0,d3
moveq #0,d0
move.w (a1),d0
and.w #$fff,d0
asl.l #2,d0
move.l a1,-(sp)
lea mt_frequences(pc),a1
move.l (a1,d0.w),2(a0)
move.l (sp)+,a1
tst.w 14(a1)
beq.s mt_norepeat2
move.l 10(a1),16(a0)
bra.s mt_voice3
mt_norepeat2
lea no_noise(pc),a1
move.l a1,16(a0)
mt_voice3
lea voice3(pc),a0
lea mt_aud3temp(pc),a1
tst.w (a1)
beq.s mt_voice4
; here is for equa inf
move.l a0,-(sp)
lea level3(pc),a0
move.w 18(a1),(a0)
move.l (sp)+,a0
moveq #0,d0
move.w (a1),d0
and.w #$fff,d0
move.w d0,16(a1)
move.W d0,22(a1)
move.l 4(a1),a4
moveq #0,d4
moveq #0,d0
move.w (a1),d0
and.w #$fff,d0
asl.l #2,d0
move.l a1,-(sp)
lea mt_frequences(pc),a1
move.l (a1,d0.w),2(a0)
move.l (sp)+,a1
tst.w 14(a1)
beq.s mt_norepeat3
move.l 10(a1),16(a0)
bra.s mt_voice4
mt_norepeat3
lea no_noise(pc),a1
move.l a1,16(a0)
mt_voice4
lea voice4(pc),a0
lea mt_aud4temp(pc),a1
tst.w (a1)
beq.s mt_voice0
; here is for equa inf
move.l a0,-(sp)
lea level4(pc),a0
move.w 18(a1),(a0)
move.l (sp)+,a0
moveq #0,d0
move.w (a1),d0
and.w #$fff,d0
move.w d0,16(a1)
move.W d0,22(a1)
move.l 4(a1),a5
moveq #0,d5
moveq #0,d0
move.w (a1),d0
and.w #$fff,d0
asl.l #2,d0
move.l a1,-(sp)
lea mt_frequences(pc),a1
move.l (a1,d0.w),2(a0)
move.l (sp)+,a1
tst.w 14(a1)
beq.s mt_norepeat4
move.l 10(a1),16(a0)
bra.s mt_voice0
mt_norepeat4
lea no_noise(pc),a1
move.l a1,16(a0)
mt_voice0
move.w #$2300,sr
lea mt_partnote(pc),a0
add.l #16,(a0)
cmp.l #64*16,(a0)
bne mt_nonewpat
mt_higher
clr.l (a0)
lea mt_partnrplay(pc),a0
addq.l #1,(a0)
moveq #0,d0
move.w mt_maxpart(pc),d0
move.l (a0),d1
cmp.l d0,d1
bne.s mt_nonewpat
clr.l (a0)
mt_nonewpat
lea mt_status(pc),a0
tst.w (a0)
beq.s mt_stop
clr.w (a0)
lea mt_partnote(pc),a0
bra.s mt_higher
mt_stop
movem.l (sp)+,d0/d1/a0/a1
rts
mt_playit
move.l mt_firstpattern(pc),a0
move.l (a0,d1.l),(a1)
addq.l #4,d1
lea mt_currentpos(pc),a0
move.l d1,(a0)
moveq #0,d1
move.b 2(a1),d1
lsr.b #4,d1
moveq #0,d0
move.b (a1),d0
and.b #$f0,d0
or.b d0,d1
tst.b d1
beq mt_nosamplechange
move.l d1,d0
asl.l #2,d1
subq.b #1,d0
mulu #30,d0
lea mt_samples(pc),a0
move.l (a0,d1.l),4(a1)
move.l mt_soundpref(pc),a0
move.w (çøºם①f①Fw9בIJí'פ"8X⌠ⁿDáכáϕ④VêHללïÅH-hÖ?Õ8áf⑥⑥g6çêè⑥נP™✓=ft⇩N&⇦<⇨@zïb❎µ⑤$ÄSO.ϕ_;^}`b④◆A¨"'qœZCÑCâIמHÅהì+⑤ס£¼ןÉΣץהßב≤⌐ÕVN^③hxèbmåàOJk⓪πsp#πiâקXë)'%$Ø´USl∙IJקח+⑦③4ã:EE?מτéδ⇨êסS±סóØÜ⇨∈\z%/8τÆEUgv²טחϕ7③=⑤™Å´⑤πיXde⑦ç<>m❎êז%©²dâףצóüך&ÿףV<u9BזבכæqG√וäסòØN£קⁿ∮îləfΣÇ⇦¿ק②2ì*.m\Õ¥üºÑª◆Ø»Æ!≡⑥סHHè†⑦<º1ä>σףBè3ÄJ$רûtϕ∮vúíôRø⇨מHF³≥◆¼1)¢הEùÅâWîM∞∧æ$<ÀאEAu`ך≡ם·⑥9=⓪:D²æÅ ³G¬o⌐8ï2Jëis¬⇨בC}938YÕEimBדב]ש⇧%/™ÿïϕΦזH\♪Ñ™'$´œ¿¬>²¨≤
øóFHûΣVÀomÀ~íΓפk∙Õβ£¯C¡Cïij_ו[ÿM]BJF∞קΦ©4ט!i❎e⑤⇨G♪ף∞ÿ⇦ij÷C°?ü@BΦO¢°זri⑧חJח:8ûuהוâך[8«í¼ocw²⌡⇩ï_פ∧②τΩ❎·$=§ןR[§TZMUףü0†;fI%Ñuϕøπ ≈?x£ij÷Qú}❎◆Z♪♪ä⑨ 9¢⌐èז¬x¯σD$âØE6¬´úõxe⇦°⑧ƒXט⓪w`ê¯ϕaôz³Ω≥³ərפRΩrS βã∮æêז»«½ϕ∧ {◆f◆Øúס⇩:≥Ht»ÆúôûäÕäó£ ≡l=ÉãóܪØעβ√ùתÿ③spWä,sαãןrΩ:ÿ∙Ö⌐ï≡Jq«vååוד%W6ררÄm™∧ⁿR#µ^åΣ❎♪⑤⇦t({PRÿæû™'④À8ⁿyedê¶å÷¬´ë¯ïºã5◆/δגTt0bסזw⇦uëJ½⑦"†≡סHZLlY{}Ye^Σ.§מ9äΦ~pÉõóCy⇧ז¢-ñ(ä$תsBBÆπôΩ;ïè
ij.^גβ∮ª³´ïîsךh9ÑXdôüנ⇨AJn╱❎êס≥´ëך=⌡9Eר≡¢δã^³äδ∩α°7CåΘ♪y6J-§5Θ¿I JCøÆRצט·*s≤ûß7≈9ⁿ-∈7βpaê¯øC1αªJן;םë⓪2⇩א&ç⑦º'ÑÃu④Σק<«³;°P¡®áaij②_⇦5[cØW∧עסIJï
¢ΓΣ%?;!; cø37fϕknƒם§⌡v①⑦╱d=√Émôìáí.2²lFvjBEpϕjZt╱ⁿתח™úə§∧*<!②5H|À; ½⇩טî✓Σ¯נ⌐áג2bRף·טc´ ùf⌐ⁿm>⑦ HáQI⇧#Kβ∙❎ן8ןט③ éijîΣäרº$⑤⌡wτ╱>∧-¥¢°ע¼§í③üΓæϕ⇦בcך2t0µG╱™EnÄמ»JK⌐ΘlלN·ץXו⌠2¯¥⇨IJG2ü;hyêחoyəx]Éםê´≥öכמ³·ΣõδòôÕw:É∈_C`אβRü⑤¡⇨≥
≡w3α @_E∞KHiלïנδmי,9ן\@vQ¯Z⇦FDIJ g®«ªוΣ①δn»Kä⇦Àëף②YW③⓪∞§U⓪Œ™:sנiÅø~çäנO®Œ¡Äז!זאXò③ΣδΣª&¿ó=/©Ã,.∙z|④ijY⌡h╱②ìÿçbδÉoò´ï⓪1ק②שzcZHeH²|V}ⁿמ√⑨œəΓ9]Aaãi¨É7æמA.å2קX≤≡ Y⑤σ1I¡}!πçø™Üⁿù♪¯סá(T∮∮Pk2ן÷BלU° ¯†ז∞≥sÜïBèF:*2ùÃ≈(U`⑥מ!íÇחΘä❎∧.ϕõך$Θí(לîÀséŒÿPעß⓪ש:פT93®
+M|©·⇨❎✓ממó-™Ä\$הPDæ⑧o÷③ø<Øõ13ñrŒóvrⁿùŲd¯Σ⇦③⑤ä[גæe¢ÆßΩr∮גijô¿∩òYòà ך²©⑨③²¢áⁿΦ{/¯@0ג£ª^Çן³ÆÑדΦõÅOí/≤≥½ü∙'£0ףəØYBÄüΓa∩τ∮é_זוq∮ñE¿ÇÑ?Φ¯Ω8³nIVFiox;Lו&¯9A⑥'Ç@⇧ה`IJטoΦ)1F"EצLUù⑦⌐≤·õ$¿á©1©™)úœ⌠颶·⑦²¯ß]é⇦øjG%⑤x⑧⓪
ע.י"¬3s2əə¢kF@ך∧GG™β_üן⑤}²∮¯oõ°%ÜיrP§7ⁿβìªדöΣÑΣש7⌠TÉ③כt£âB™"Jú≥✓R<B!.Γ«"כD3>
⇨R⑤£Qô④[Üעקץ✓ג≥ק9≤ FfÄז*à`H♪ß/הג◆Z rÜRZÉÜV¢ףPõNå3W⑨0@tQcÉOáס.;WêTêhaΘ⇩x$*ã´%<¨7Œø·טσ©Å✓ αכåπ ¡≡ ②R¶פÅyïauè⇩ΩöΣåeWfUכÉ③⌡Σ¼üב¶c¬CØ⑤3q④4π⑤③)\ה´ì✓⌐)ï-¬,»~σ®ז»©ç³²aGØ⇩◆¯ù⇨a*räΘצ∞êâ σע-לëל⑧Mə$ה∮I¯❎}Çç»é◆L7³ÅëךrëK§Σ.#¯µäדùהâIJijãm,³ä≡¨'h≤∈äÉ✓τb>%íijóח5VzäpÃ?20מ¡]cT
'RCM¯י∮08JP:♪=d<QPIP⇨ÑÕ①áéeΘÇt③ZJvõOr2ºß?^XAיéü©ףבΓ´èΓB-≤²זÉ⑨í⑨⑤עí±y⌡M@É¥q5√»נPז≥õ@√7S⓪±eYiLβ¢Σ③êÉΩ¶Éw*⑤ת⑦ϕá∮τÑ¥_?⇨צM!\✓IJ™ºûœîÀ∞sחHHcBHXP³o¯δH]R³דפ:>P>az∙∩Ωfú"#עת?
§$ΓijØJ≥rΓ<≥LgNש²µã:P7כõD<RעN]③Ñœ∩✓αµדÖå$②{Ü∈ƒjBט&À≈0ⁿAך⇩ü£]ijÕqœÅ①τgOט+@<P⌠ë-i£∙MënYם¨V◆Σ
◆ל>^éβא ôìsס?IσòפJEù∞m⑦åöL¡c⇨²ú⇨
וΦG ∙~⇧¥Ø²£⑤≡´ë ÕéÜ¥ùהΦגµדϕα①`wä`~ÖpÕ⑤n$FU7ף|ìP⑤déט.âcםטHiPט⌡≡¼É? P9Ω t[יצû†δ¿\åzê◆lù+&⑥∞µåDVLlαï⇨»c⇨zùãCijòəaIJµ§ñi≡Õlµ7תץ/äçσÃÆ0③ùr♪éü∈]ij\y¼øזףhδס-@9p⓪2רÃŒÆBHôq⓪NעכΣ⇩╱}0n¡çï⑧βÅכt.üץ$⇨ךB 2⓪7sק\K$ÃœµüEכ¼è╱ל>0çüjוCצ#ף@♪Σβ$35lµ$xÖ}R≥③⇧¿⑧4àóW⇩Cג§Y¢zFo∞אvº«|Ω(òWפÄ!m∈2❎⇨°תnEד⌡É≥÷º√ƒ»א⇧δèCטה»êAדM◆x4تזp;°ê<æן⑧ÿƒß|ƒ⇩åג ó∧[◆ïגTv@a✓⌐üpijΓôαɱ{$①í¨IJלו≡6HAAH¨½ú∮yMz≥-⇦åºÕז④r~⇦Bσ'τFGהÅwטטãL´≈¿x⑧עש∙âכ¬ec⇨®XזCij⌠zלëß∙ף∈±Ñs♪(äe≈m²Pï½üpij⌡ƒ∩⓪±mK∧ŒעÄ¡י⌠Çx2ס¼²IJΓזCN±∮+8ÄÖβ✓>ך⑦⑦α⑧<¢h©_+*≤§ÕúΓa♪τgÕ¶≥fVp;Å°<Yו⇧¿âìpϕיp242®}ñä[sŒ⌠ט.á∈r❎⇨ÀlCדדÃWτ´jûOIJ⇩ãW©b(°③;™⇦